void quickSort(double a[], int l, int r, int dir);
int partition(double a[], int l, int r, int dir);
int partitionIdx(double a[], int idx[], int l, int r, int dir);
void quickIdxSort(double a[], int idx[], int l, int r, int dir);

